Negotiable instrument processing apparatus

ABSTRACT

An apparatus and a method for processing checks and other negotiable instruments efficiently captures MICR data required for electronic payment and an image of the check or negotiable instrument enabling the amount, payee, and other information printed or written on the check face to be clearly read. The image reading unit  11  of the check processing apparatus  110  scans and outputs a gray scale image of the check. A threshold value determination unit  12  sets a threshold value for digitizing the image data based on the density level frequency distribution of primary gray scale image data obtained by the image data reading unit scanning a first scanning area T. This first scanning area contains part of a printed text area  127  where text is printed on the negotiable instrument and part of the background  49  of the negotiable instrument. A digital image processor  20  digitizes and converts secondary gray scale image data to digital image data based on the threshold value set by the threshold value determination unit  12 . The secondary gray scale image data is generated by the image reading unit  11  scanning a predefined second scanning area of the negotiable instrument.

RELATED APPLICATIONS

Japanese patent application No.(s) 2001-312947, is hereby incorporatedby reference in its/their entirety.

CONTINUING APPLICATION DATA

This application is a divisional of application No. 10/175,941 filedJun. 19, 2002. The contents of this prior application are incorporatedherein by reference in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to an apparatus and a method for capturing imagesof negotiable instruments such as checks used for settling transactions.

2. Description of the Related Art

Checks and other such negotiable instruments are widely used to settlecommercial transactions and to pay for purchases in stores andrestaurants. This payment process is described below using checks by wayof example. An account number and related information is generallyprinted on the face of a check as magnetic ink character data (MICR)enabling the account information to be read automatically forverification with the financial institution.

When a check is used for payment in a retail store, for example, thepayee, date, and amount are printed on the face of the check after thecheck is verified, and the verification number, date, amount, and otherendorsement information is automatically printed on the back of thecheck using a printer. After the store has finished processing thecheck, the check is typically delivered to the bank or other financialinstitution where the final payment process (check clearing) iscompleted. Electronic payment has been promoted in recent years as a wayto increase the efficiency of the payment process by electronicallysending the transaction data and images of the printed front and back ofthe check to the financial institution.

Checks, however, normally have a background pattern on the front of thecheck, and if the check image is captured at low resolution it can bedifficult to read the printed text information, including the accountnumber, payee, date, and amount. If the scanned images are captured athigh resolution or color images are captured, however, the time requiredfor the scanning process is undesirably long. High resolution and coloralso greatly increase the size of the image data, making large capacity,high speed storage devices necessary for storing the image data andrequiring more time to transmit the scanned image data to the financialinstitution.

OBJECTS OF THE INVENTION

An object of our invention is therefore to provide a negotiableinstrument processing apparatus and method for efficiently capturingimage data from a check or other negotiable instrument, and foreffectively differentiating the magnetic ink character data required forelectronic payment and printed data on the front of the check frombackground printing or other marks or information on the check.

SUMMARY OF THE INVENTION

To achieve this and other objects, a negotiable instrument processingapparatus according to the present invention has an image reading unitfor scanning a negotiable instrument and outputting gray scale imagedata; a threshold value determination unit for setting a threshold valuefor digitizing gray scale image data based on a density level frequencydistribution in primary gray scale image data obtained by the image datareading unit scanning a first scanning area; and a digital conversionprocessing unit for digitizing and converting secondary gray scale imagedata to digital image data based on the threshold value set by thethreshold value determination unit. The first scanning area containspart of a printed text area where text is printed on the negotiableinstrument and part of the background of the negotiable instrument. Thesecondary gray scale image data obtained by the image reading unit scansa predefined second scanning area of the negotiable instrument.

Our invention therefore dynamically sets a threshold value used toconvert a gray scale image of a check or other negotiable instrument todigital image data based on a part of the image consideredcharacteristic of image features in the check or other negotiableinstrument. It is therefore possible to obtain digital image data fromwhich text information can be accurately determined and read.

The first scanning area preferably includes a first area containing apart of the printed text area and a second area containing a part of thebackground, and the first and second areas are noncontiguous. Therequired memory capacity and processing time required to determine thethreshold value can thus be reduced.

Further preferably, the second area includes multiple sections eachcontaining part of the background. This enables the threshold value tobe appropriately determined even if the background of the check ornegotiable instrument is mottled (not of uniform density).

Yet further preferably, the threshold value determination unitdetermines the threshold value based on a density level frequencydistribution after weighting scale data in the first area. Thus,emphasizing data in the area where text is known to exist enhances thedensity values detected in the text area and makes it possible to set anappropriate threshold value.

Yet further preferably, the printed text area is a magnetic inkcharacter printing area where magnetic ink characters are printed. Inthis case, the negotiable instrument processing apparatus also has amagnetic head for reading magnetic ink characters, and the thresholdvalue determination unit detects the magnetic ink character printingarea based on output signals from the magnetic head, and sets the firstscanning area based on said magnetic ink character printing area. Thismakes it possible to appropriately set the first scanning area.

Further preferably, the threshold value determination unit averages thedensity level frequency distribution and determines the threshold valuebased on the averaged density level frequency distribution. Thisaveraging process removes noise, and thus enables accurate extractingthe features of the density level frequency distribution.

Yet further preferably, the threshold value set by the threshold valuedetermination unit is a lightness value for generating the digital imagedata so that the text is readable, but the background is substantiallyremoved. Yet further preferably, the threshold value determination unitidentifies a peak representing the text and an adjacent peakrepresenting the background in the density level frequency distribution,and sets the threshold value between the peaks.

Our invention is also a method for processing checks and other suchnegotiable instruments. The method of our invention achieves the sameeffects and benefits described herein.

Other objects and attainments together with a fuller understanding ofthe invention will become apparent and appreciated by referring to thefollowing description and claims taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of a check processing apparatus accordingto a preferred embodiment of this invention;

FIG. 2 is a side sectional view showing the internal structure of thecheck processing apparatus;

FIG. 3 shows the layout of a typical check;

FIG. 4 is a block diagram of the controller inputs and outputs;

FIG. 5 is a flow chart showing the control sequence of the first processcontrol mode;

FIG. 6 illustrates operation in the first process control mode;

FIG. 7 is a function block diagram related to the scanning operation ofthe control unit;

FIG. 8 is a block diagram of the threshold value setting process and theimage capturing process;

FIG. 9 is a plan view of a check;

FIG. 10 shows digital image data captured from the check in FIG. 9;

FIG. 11 is a flow chart of scanning process control;

FIG. 12 is a flow chart of the control steps in the histogram generationprocess;

FIG. 13 shows the concept of the provisional scanning area;

FIG. 14 is a histogram of the MIC area;

FIG. 15 is a histogram of the background;

FIG. 16 is a combined histogram of the MIC area and background;

FIG. 17 is a flow chart showing the control steps in the threshold valuecalculation process;

FIG. 18 is a histogram of MIC area showing minimum limit PMin andcumulative relative frequency Tr1 by way of example;

FIG. 19 is a histogram of MIC area showing a provisional MIC maximumlimit Pm1Max and cumulative relative frequency Tr2; and

FIG. 20 is a histogram showing the relationship between the provisionalMIC maximum limit Pm1Max and the true MIC maximum limit PmMax.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

A preferred embodiment of the present invention is described below withreference to the accompanying figures. FIG. 1 is a perspective view of acheck processing apparatus according to a preferred embodiment of thisinvention. As shown in the figure the check processing apparatus 110 iscovered by a plastic cover 111, has an insertion opening 112 at thefront for manually inserting a check, and has a check exit 113 fromwhich the check is ejected from the top. This check processing apparatus110 also has a roll paper housing unit (not shown in the figure) forstoring roll paper at the back part. Roll paper is stored in the rollpaper housing unit, pulled therefrom, passed through the printing unit,and ejected from a roll paper exit 114 in the top of the checkprocessing apparatus.

FIG. 2 is a side sectional view showing the internal structure of thecheck processing apparatus. As shown in FIG. 2 a check transportationpath 115 is formed inside the check processing apparatus 110 and extendsfrom the insertion opening 112 to the check exit 113. When seen from theside, the check transportation path 115 curves in an L-shape with theinsertion opening 112 side horizontally oriented and the check exit 113side vertically oriented. Positioned along the check transportation path115 in order from the insertion opening 112 side are a form trailingedge detector 116, magnetic head 117, first feed roller pair 118, formleading edge detector 119, form positioning member 120, back print head121, second feed roller pair 122, front print head 123, form ejectiondetector 124, scanner 125, and scanner feed roller 126 opposite thescanner 125.

The form trailing edge detector 116, form leading edge detector 119, andform ejection detector 124 are, for example, transmitting or reflectingtype photodetectors enabling non-contact detection of the presence of acheck at various positions along the check transportation path 115.

The form positioning member 120 temporarily stops a check inserted fromthe insertion opening 112 at a specific position, and is configured sothat it can be changed by driving a solenoid or other type of actuatorbetween a position where the actuator projects into and closes the checktransportation path 115 and a position where the actuator is retractedfrom and opens the check transportation path 115.

The first feed roller pair 118 and second feed roller pair 122 are pairsof roller members positioned so that the rollers of each pair are onopposite sides of the check transportation path 115. A check can betransported in forward and reverse directions by appropriately drivingone of the rollers. One roller in each pair can also be freely retractedfrom or advanced toward the other roller member so that the checktransportation path 115 can be opened or closed by driving a solenoid orother actuator to appropriately retract or advance the rollers.

The magnetic head 117 is used to read the magnetic ink charactersprinted on the check face. Whether a check is valid or not is determinedbased on the data read by the magnetic head 117. As shown in FIG. 3, themagnetic ink characters are printed in a specific magnetic ink characterrecording area 127 on the front of the check, and record the checkingaccount number and other information. A pressure member 117 a forpressing a check against the magnetic head 117 for magnetic inkcharacter reading is positioned opposite the magnetic head 117, but isnormally retracted from the magnetic head 117 so that the checktransportation path 115 is open during all operations other thanmagnetic ink character reading.

The front print head 123 is used for printing the payee, date, amount,and other check face data on the front of the check. This data isprinted on the face printing areas 128 shown in FIG. 3. The front printhead 123 is a serial print head supported on a carriage for printing adot matrix of one or multiple columns while travelling widthwise overthe check. A dot impact type print head for transferring ink from an inkribbon to the check is used as the front print head 123 in thispreferred embodiment, but other types of print heads can alternately beused.

The back print head 121 is used for printing a customer verificationnumber, date, amount, and other information required for endorsement bythe store on the back of the check. This endorsement data is printed onan endorsement printing area 129 as shown in phantom in FIG. 3. The backprint head 121 is a shuttle head having multiple heads spaced atspecific intervals widthwise to the check, each head printing a dotmatrix of one or more columns by movement of the head within the widthof this specific interval. A dot impact type print head for transferringink from an ink ribbon to the check is used as the back print head 121in this preferred embodiment of the invention, but other types of headscan alternately be used.

The scanner 125 scans the face of a printed check. The scanned imagedata is sent to and stored in a host computer 200 (FIG. 4) and used forelectronic payments and electronic payment verification. The scanner 125in this embodiment is a contact image sensor (CIS) capable of generatinga 256-level gray scale image, and scans with the check pressed againstthe scanning surface thereof The scanner feed roller 126 transports thecheck for the scanning operation, and presses the check against thescanning surface of the scanner 125 while transporting it toward thecheck exit 113. When not scanning, the scanner feed roller 126 retractsfrom the scanner 125 so that the check transportation path 115 is open.During the scanning operation the check is transported upward by thescanner feed roller 126 while the scanner 125 scans the check, and thecheck is then ejected from check exit 113. After the check istransported to the scanning start position by the first feed roller pair118 and second feed roller pair 122 in the scanning operation,retraction of the scanner feed roller 126 is cancelled so that the checkis pressed against the scanner 125 while the scanner feed roller 126 isdriven to transport the check over the scanner 125 surface while it isscanned.

FIG. 4 is a block diagram of the controller inputs and outputs. As shownin FIG. 4, the check processing apparatus 110 has a control unit 130comprising a CPU, ROM, RAM, and other devices. In addition to theabove-described trailing edge detector 116, magnetic head 117, leadingedge detector 119, back print head 121, front print head 123, formejection detector 124, and scanner 125, the control unit 130 controls ascanner feed roller solenoid 131 for moving the scanner feed roller 126to open and close the form transportation path; a scanner feed motor 132for driving the scanner feed roller 126; a transportation motor 133 fordriving the first feed roller pair 118 and second feed roller pair 122;first feed roller pair actuator 134 for opening and closing the firstfeed roller pair 118; second feed roller pair actuator 135 for openingand closing the second feed roller pair 122; form positioning memberactuator 136 for moving the form positioning member 120 to opened andclosed positions; and mode selector switch 137 for selecting a firstprocess control mode (with scanning) or a second process control mode(without scanning). The control sequence of the first process controlmode run by the control unit 130 is described below.

FIG. 5 is a flow chart showing the control sequence of the first processcontrol mode, and FIG. 6 illustrates operation in the first processcontrol mode. It should be noted that the numbers in circles shown inFIG. 6 correspond to the parts of the same numbers shown in FIG. 2, andindicate the position of those parts relative to a check P in the checktransportation path 115.

As shown in the figures, the first step in the first process controlmode is to wait for insertion of a check P (S501). During this time thefirst and second feed roller pairs 118, 122 are held open, and the formpositioning member 120 and scanner feed roller 126 are held closed. Notethat if operation was previously in the second process control mode, thescanner feed roller 126 is open.

When a check P is inserted from insertion opening 112, check insertionis detected from the detection signals output by trailing edge detector116 and leading edge detector 119 (FIG. 6 (1)). When check insertion isdetected, the first feed roller pair 118 closes (S502), the scanner feedroller 126 opens (S503), and the form positioning member 120 opens(S504). MICR text is then read with the magnetic head 117 (S506, FIG. 6(2), (3)) while driving the transportation motor 133 in the formejection direction (S505). After MICR reading, driving thetransportation motor 133 stops (S507) and the second feed roller pair122 closes. The data read with the magnetic head 117 is sent to a hostcomputer for check verification. When the verification result isreceived from the host computer the result is evaluated (S508). If thecheck is invalid, an invalid check ejection process (S509) is run andthe first process control mode ends.

If the check is valid, the transportation motor 166 is driven in theform ejection direction (S510) to set the check for endorsement printingon the check back (S511, FIG. 6 (4), (5)). The check is set to theendorsement printing position and to other various positions noted belowby driving the transportation motor 133 a specified number of stepsreferenced to positions detected by the detectors 116, 119, 124(including stopping form transport). When positioning for endorsementprinting is completed the transportation motor 133 is driven in theinsertion opening 112 direction (S512) while running the endorsementprinting process with the back print head 121 (S513, FIG. 6 (6), (7)).

When endorsement printing is completed, the check is set to the frontprinting position (S514, FIG. 6 (8), (9)), and then, while driving thetransportation motor 133 in the form ejection direction (S515) the frontof the check is printed using the front print head 123 (S516, FIG. 6(10), (11)).

When the check front printing process is completed the transportationmotor 133 is again driven in the insertion opening 112 direction (S517)to set the check to the start scanning position (S518, FIG. 6 (12),(13)). The scanner feed roller 126 is then closed (S519), and the firstand second feed roller pairs 118, 122 are opened (S520). The scanningprocess (S522, FIG. 6 (14)) is then run while driving the scanner feedmotor 132 in the form ejection direction (S521). The scanning process isdescribed in detail further below.

A check ejection decision (S523) is then made after the scanning processends. If the check was ejected (FIG. 6 (15)), driving the scanner feedmotor 132 stops (S524), the form positioning member 120 is closed(S525), and the first process control mode ends.

It should be noted that by controlling the transportation motor 133synchronized to the scanner feed speed in the first process controlmode, the check can be transported to the end of the scanning processwith the first and second feed roller pairs 118, 122 closed.

As noted above, the second process control mode differs from the firstprocess control mode in that the scanning process is not run in thesecond process control mode. More specifically, the check continues tobe transported toward the exit in the second process control mode afterthe check front printing process ends, and check ejection is evaluated.Driving the transportation motor 133 stops and the form positioningmember 120 is set to the closed position when it is determined that thecheck has been ejected. Removal of the check is then determined based ona detection signal from the form ejection detector 124, and the firstsecond roller pairs 118, 122 are opened and the second process controlmode ends when it is determined that the check has been removed.

FIG. 7 is a function block diagram related to the scanning operation ofthe control unit 130. The control unit 130 has a threshold valuedetermination unit 12 and an image capturing unit 13, and controls animage reading unit 11 to scan a check. The image reading unit 11includes the above-noted scanner 125, scanner feed roller 126, scannerfeed roller solenoid 131, and scanner feed motor 132.

The threshold value determination unit 12 calculates and sets thethreshold value needed for the digitizing (binarization) process thatgenerates the digital (binary) image data from the 256-level gray scaleimage data by using a provisional scanning controller 16 and thresholdvalue calculator 17 under the control of a threshold value settingcontroller 15.

It should be noted that the image data that results from scanning isreferred to herein as gray scale image data, meaning that the density ofeach sample is being expressed with some number of bits per sample,which is the precision of the sample. One example used herein is256-level gray scale, which is 8-bit precision, but 4-bit, 10-bit orother bit precision could also be used. In the example used herein with256-level gray scale, the value 0 represents maximum darkness and thevalue 255 represents maximum lightness.

The image capturing unit 13 generates and sends digital image data tothe host computer by digitizing the gray scale image data using scanningcontroller 19, digital image processor 20, image storage unit 21, andcommunications unit 22, under the control of image capturing controlunit 18.

FIG. 8 is a block diagram of the threshold value setting process of thethreshold value determination unit 12 and the image capturing process ofthe image capturing unit 13. The provisional scanning controller 16drives and controls the image reading unit 11 to scan and capture partof the check (referred to as provisional scanning area T) using thescanner 125. A frequency distribution process 33 is applied by thethreshold value calculator 17 to the gray scale image data obtained fromprovisional scanning area T of the check by the provisional scanningcontroller 16; this image data is referred to below as the MIC areaimage data 31 and background image data 32. This frequency distributionprocess generates a histogram (a frequency distribution of the number ofpixels of each density (gray) level) of image density from the 256-levelgray scale data. The threshold value calculator 17 then applies anaveraging process 34 to the histogram generated by the frequencydistribution process 33 to remove noise and extract (sharpen) imagefeatures. The threshold value calculator 17 then runs a maximum/minimumsetting process 35 to determine the maximum and minimum threshold valuesbased on the histogram after the averaging process 34, and runs athreshold value calculation process 36 to determine an appropriatethreshold value within the range defined by these maximum and minimumvalues. It should be noted that the threshold values determined by thethreshold value calculator 17 can be stored in the threshold valuedetermination unit 12 and read by the digital image processor 20 asneeded, or they can be stored in the digital image processor 20.

Once the threshold values are determined, the scanning controller 19controls and drives the image reading unit 11 to run an image readingprocess 37 for scanning and capturing the entire face side of theprinted check using the scanner 125. It is also possible to scan andcapture a predefined area including at least both the magnetic inkcharacter recording area 127 and the face printing areas 128 instead ofscanning the entire front of the check.

The digital image processor 20 then converts the gray scale image datacaptured by the image reading process 37 of the scanning controller 19to digital image data by applying a digitizing process 38 to each pixelbased on the threshold values determined by the threshold valuedetermination unit 12.

The image storage unit 21 then runs a digital image storage process 39to temporarily store the digital image data generated by the digitizingprocess 38 of the digital image processor 20, and the communicationsunit 22 runs a digital image transmission process 40 to send thetemporarily stored digital image data to the host computer. It is, ofcourse, also possible to send the digital image data directly to thehost computer instead of providing an image storage unit 21 and digitalimage storage process 39.

The host computer stores the received digital image data with theelectronic payment data in a searchable format in the image storagedevice of the host computer. The digital image data can also becompressed by the check processing apparatus 110 or the host computer.When processing and verifying an electronic payment, the paymentclearing house can then read and reference a digital image of the checkbeing processed from the image storage device.

It will be further noted that if the threshold values cannot becalculated for some reason, such as when the background pattern is dark,the image capturing process can be terminated and an error process run,or the gray scale image data can be sent directly to the host computerwithout thresholding.

FIG. 9 is a plan view of a check. The payer 41, serial check number 42,date issued 43, payee 44, payment amount 45, memo 46, account holdersignature 47, and magnetic ink characters 48 are either preprinted onthe blank checks or written or printed on the check P at the time thecheck P is used. Except for the check number 42, magnetic ink characters48 and other information preprinted on a blank check P, the controlprocess can be written so that all other check information can beprinted or written onto the check after the provisional scanning stepdescribed above. The background 49 of the check P is also not limited tomonochrome patterns, and checks with various pictures or patternscontaining various colors and color densities in the background 49 arewidely used. The check P shown in FIG. 9 is an example of this type, andwhile not clearly shown in FIG. 9 the background of this check P is apattern of darker gray gradations over a light gray base.

FIG. 10 shows the digital image typically extracted from the check Pshown in FIG. 9. In the digital image data 50 obtained by a binarizationprocess converting each pixel in the gray scale image of the check P toeither white (255) or black (0), each pixel in the background 49 isconverted to white, thereby effectively removing the background pattern.Reference numerals 51 to 58 in FIG. 10 correspond to reference 41 to 48in FIG. 9.

The scanning process is described next.

FIG. 11 is a flow chart of the scanning process control steps. The firststep is to capture a gray scale image of the provisional scanning area T(FIG. 9) from part of the check by a provisional scanning operation(first scanning operation) (S101). A histogram is then generated fromthe captured gray scale image data. The histogram generating process isdescribed in detail further below.

The threshold values for the digitizing process are then calculated fromthe histogram (S103). A gray scale image of the entire check face isthen captured by a final scanning operation (second scanning operation)(S104), and the digital image data is generated by a digitizing processusing the calculated threshold values (S105). The resulting digitalimage data is temporarily stored in the image storage unit 21 and sentto the host computer (S106).

It should be noted that the provisional scanning process (S101) is notlimited to being run within the scanning process (S522), and can be runsimultaneously to the MICR process (S506) or the scanning start positionprocess (S518). It is particularly preferable to provisionally scan thecheck P either during the MICR process (S506) before the front printingprocess (S516), or after the MICR process (S506) but before the frontprinting process (S516), in order to more accurately extract imagefeatures from the background 49 of the check.

The histogram generation process is described next.

FIG. 12 is a flow chart of the control steps in the histogram generationprocess. The first step is to apply the frequency distribution process33 to the MIC area image data 31 in the image data captured by theprovisional scanning operation to generate a histogram of the MIC text(S201). A histogram of the background is also created by applying thefrequency distribution process 33 to the background image data 32 in theimage data captured by the provisional scanning step (S202). Theaveraging process 34 is then applied to the MIC histogram and thebackground histogram (S203). This averaging process calculates theaverage of a pixel i and the four pixels before and after pixel i (atotal of nine pixels), and assigns the resulting average as the value ofpixel i. More specifically, the average of pixel (i−4), pixel (i−3),pixel (i−2), pixel (i−1), pixel i, pixel (i+1), pixel (i+2), pixel(i+3), and pixel (i+4) is used as the value of pixel i.

An example of provisional scanning areas T (T′) is shown in FIG. 9. Asshown in FIG. 9 these provisional scanning areas T (T′) contain bothmagnetic ink characters 48 and background 49. The magnetic ink characterrecording area 127 is standardized according to the type of check(personal check or business (voucher) check), and where the magnetic inkcharacters 48 are printed can therefore be identified.

More specifically, the location where the magnetic ink characters areprinted can be determined based on the height (s,c) in the direction ofthe short side of the check and the length of the magnetic ink character48 string derived from the output signals of the magnetic head 117. Thisheight (s,c) (that is, the length in the heightwise direction of themagnetic ink characters 48) is defined by the check printing standard,and the length of the MIC string is derived from the output signals ofthe magnetic head 117 because the number of magnetic ink characters isvariable. It should be noted that the check P is inserted into the checkprocessing apparatus 110 leading with the right side edge of the check,and the magnetic ink characters 48 are therefore read from theright-most digit to the left-most digit.

The provisional scanning area T is an area with a specific width (b) inthe form transportation direction from the position where the firstmagnetic ink character is detected. The other provisional scanning areaT′ is an area with the same specific width (b) in the transportationdirection starting from a point separated a specific distance in thetransportation direction from where the first magnetic ink character isdetected. The provisional scanning areas T (T′) could alternatively beset to areas including text preprinted on other specified areas insteadof using the magnetic ink characters 48.

FIG. 13 shows the concept of the provisional scanning area. In thisexample MIC area 70 and three background areas 71 to 73 from theprovisional scanning area T are used as the areas (specified areas) forhistogram generation. The MIC area 70 and three background areas 71 to73 are all the same size. In this example they are 8 mm (b)×5 mm (c). Inorder to set appropriate threshold values, these specified areaspreferably contain the smallest possible number of pixels containingmagnetic ink characters 48 and background 49. It is thus possible to useonly part of the image data in provisional scanning areas T (T′) to setthe threshold values, or all image data in the scanning areas T (T′)could be used. If only part of the image data in provisional scanningareas T (T′) is used the required processing time and storage space canbe reduced.

FIG. 14 is a histogram of the MIC area 70 produced by the histogramgeneration process (S201, S203), and FIG. 15 is a histogram of allbackground areas 71 to 73 produced by the histogram generation process(S202, S203). FIG. 16 is a histogram combining the histogram of the MICarea 70 and the histogram of all background areas 71 to 73, and isprovided for descriptive purposes. It should be noted that a singlehistogram is produced for each of the background areas 71 to 73 andthese individual histograms are then merged to produce the backgroundarea histogram shown in FIG. 15. The first peak 80 between densitylevels 20 to 60 corresponds to the set of pixels forming the magneticink characters 48 in MIC area 70, and the second peak 81 from densitylevels 100 to 160 corresponds to the set of pixels representing thebackground 49 in the MIC area 70. Third peak 82 from density levels 160to 210 shows the set of pixels representing the background 49 inbackground areas 71 to 73.

The threshold value calculation process is described next.

FIG. 17 is a flow chart showing the control steps in the threshold valuecalculation process. The threshold values are used to separate text frombackground and must therefore be set between the density of the magneticink characters 48 and the density of the background 49. The limit on thedark side (bottom limit) and the limit on the light side (top limit) arereferred to as the minimum limit PMin and the maximum limit PMax,respectively.

The minimum limit PMin of the threshold value is first calculated fromthe histogram of the MIC area 70 (S301). The minimum limit PMin must belighter than the density of the magnetic ink characters 48, and minimumlimit PMin is therefore calculated based on the density of the magneticink characters 48 as further described below. If minimum limit PMincannot be determined (S302 returns yes), an error handling process isrun (S309).

MIC maximum limit PmMax, which is the highest lightness limit in the MICarea 70, is then obtained from the histogram of the MIC area 70 (S303).The MIC maximum limit PmMax is the limit at which it will not bepossible to separate the background 49 from the magnetic ink characters48 if the threshold value is set any lighter. If the MIC maximum limitPmMax cannot be determined (S304 returns yes), an error handling processis run (S309).

The background maximum limit PbMax, which is the highest limit inbackground areas 71 to 73, is then similarly obtained from thehistograms of background areas 71 to 73 (S305). The background maximumlimit PbMax is the limit at which it will not be possible to separatethe background 49 from the magnetic ink characters 48 in the MIC area 70if the threshold value is set any lighter. If the background maximumlimit PbMax cannot be determined (S306 returns yes), an error handlingprocess is run (S309).

The maximum limit PMax of the threshold value is determined next (S307).The smaller of MIC maximum limit PmMax and background maximum limitPbMax is made maximum limit PMax.

The threshold value is then calculated based on minimum limit PMin andmaximum limit PMax.

An example of the averaging process is described next.

A preferred embodiment of the averaging process (S203) is describednext. The total pixel count Y captured by provisional scanning can beobtained fromY=f(0)+f(1)+. . . f(255)where pixel count y of density n (n=0, 1, . . . 255) is y=f(n).

The total pixel count Ym in MIC area 70 isYm=fm(0)+fm(1)+. . . fm(255).

The total pixel counts Yb for the background areas 71 to 73 areYb1=fb1(0)+fb1(1)+. . . +fb1(255)Yb2=fb2(0)+fb2(1)+. . . +fb2(255)Yb3=fb3(0)+fb3(1)+. . . +fb3(255).

The total pixel count Y is the sum of all pixels in the MIC area 70 andall pixels in background areas 71 to 73, and can therefore be written asY=Ym+YbYb=Yb1+Yb2+Yb3.

The pixel data (density values) of the MIC area 70 are important incalculating the minimum limit of the threshold value, but the totalpixel count in the MIC area 70 is small compared with the total pixelcount in the background areas 71 to 73. The pixel data from the MIC area70 is therefore weighted in order to calculate a more appropriateminimum limit PMin. An averaged histogram is therefore generated for theMIC area 70 after weighting. If a weighting of 2 is used, the pixelcount yv of weighted density n for MIC area 70 isyv=2fm(n)=fmv(n)the total pixel count Ymv of the weighted MIC area 70 isYmv=fmv(0)+fmv(1)+ . . . +fmv(255)and the weighted total pixel count Yt isYt=Ymv+Yb.

As noted above the averaging process is a process for averaging thepixel count of each density level based on the number of pixels of aparticular density before and after each target pixel. To average thepixel count fmv(n) of level n in MIC area 70 using k pixels of somelevel before and after each pixel, the average pixel count fma(n) oflevel n can be expressed as shown in equation 1. Note that this exampleuses four pixels before and after a pixel of level n. $\begin{matrix}{{{fma}(n)} = {\sum\limits_{k = {- 4}}^{4}{{{{fv}\left( {n + k} \right)}/9}\quad\left( {4\left\lbrack {{{n\lbrack 251)}{{fma}(n)}} = {0\quad\left( {{n < 4},{n > 251}} \right)}} \right.} \right.}}} & {{EQUATION}\quad 1}\end{matrix}$

The average level n pixel count fba(n) in background areas 71 to 73 canlikewise be denoted as shown in equation 2. $\begin{matrix}{{{fba}(n)} = {\sum\limits_{k = {- 4}}^{4}{{{{fb}\left( {n + k} \right)}/9}\quad\left( {4\left\lbrack {{{n\lbrack 251)}{{fba}(n)}} = {0\quad\left( {{n < 4},{n > 251}} \right)}} \right.} \right.}}} & {{EQUATION}\quad 2}\end{matrix}$

This averaging process removes noise from the histogram and cantherefore accurately extract density levels characteristic of the image.

Calculation of minimum limit PMin is described next.

In this example pixels are counted in the histogram of MIC area 70 fromlevel n=0 and minimum limit PMin is set at the point where the totalnumber of pixels counted is 10% of the total pixel count. The relativefrequency r(n) (=(number of level n pixels)/(total pixel count)) in MICarea 70 is therefore calculated using the equationr(n)=fmv(n)/Ymv.

The highest value of n where r(n) satisfies the following equation isthen set as minimum limit PMin. $\begin{matrix}{{\sum\limits_{k = 0}^{255}{r(k)}} < 0.1} & {{EQUATION}\quad 3}\end{matrix}$

It will be noted that minimum limit PMin is set to the level at whichthe pixel count is 10% of the total pixel count in this example and thatthis value is an experiential value determined from tests, but minimumlimit PMin can be otherwise appropriately set.

Calculation of MIC maximum limit PmMax is described next.

MIC maximum limit PmMax determines the upper limit for converting pixelsin the background 49 of MIC area 70 to white. The threshold value musttherefore be set so that pixels in second peak 81 shown in FIG. 14 arealso converted to white.

The peak density Pn1 of second peak 81 is approximately 145, and thepixel count (frequency) of each level n in the valley between peaks 80and 81 is 10 to 15. By checking the pixel count of each density levelfrom peak density Pn1 to the dark side (that is, toward the first peak80 in the magnetic ink characters 48) and selecting level n having apixel count of less than 30, it should be possible to remove the pixelsconstituting the background 49, and MIC maximum limit PmMax is thereforeset to this level n. This pixel count of 30 for setting the MIC maximumlimit PmMax was experimentally determined, and can be appropriately setotherwise. Similarly to the pixel count of 30 used in this example it isalso possible to calculate from the histogram a pixel frequency thatdoes not include most density levels of the pixels in the background 49and can be differentiated from the pixel count in the valley betweenpeaks 80 and 81.

MIC maximum limit PmMax can be determined as follows. If there are 2560pixels each in MIC area 70 and background areas 71 to 73 shown in FIG.13 and the MIC area 70 data is weighted by a factor of 2, the totalpixel count in the MIC area 70 is 2560×2=5120. To determine PmMax, thepixel count fma(n) of each level n from peak density Pn1 to the lowlevel n side is counted, and the level n at which the pixel count isless than 0.58% (=30/5120) of total pixel count Ymv of MIC area 70 isset to MIC maximum limit PmMax. This means that PmMax is set to thefirst value k wherefma(k)/Ymv<0.58% (k=Pn1, Pn1−1, Pn1−2, . . . ).

Calculation of background maximum limit PbMax is described next.

Background maximum limit PbMax can be calculated the same way as MICmaximum limit PmMax. More specifically, the peak density Pn2 of thirdpeak 82 derived from the set of pixels forming the background 49 inbackground areas 71 to 73 is detected, the number of pixels of eachlevel n where level n decreases from peak density Pn2 is counted, andthe level n where pixel count n<30 is set as background maximum limitPbMax.

The total pixel count of background areas 71 to 73 is 2560×3=7680. Thepixel count fba(n) of each level n where level n decreases from peakdensity Pn2 is counted in turn from peak density Pn2, and the level nwhere the pixel count is less than 0.39% (=30/7680) of total pixel countYb of background areas 71 to 73 is set to the background maximum limitPbMax. PbMax is set to the first value k wherefba(k)/Yb<0.39% (k=Pn2, Pn2−1, Pn2−2, . . . ).

The smaller of MIC maximum limit PmMax and background maximum limitPbMax is set as maximum limit PMax.

Calculation of the threshold value R is described next.

Threshold value R is obtained using the following equation based onminimum limit PMin and maximum limit PMax.R=PMin+(PMax−PMin)×0.58

That is, the threshold value is calculated to be a value closer to Pminthan the intermediate of minimum limit PMin and maximum limit PMax. Thisis to remove as much of the background pattern as possible. It should benoted that the coefficient 0.58 used in this example was determinedexperimentally, and can be appropriately set otherwise.

A second example for calculating minimum limit PMin and maximum limitPMax is discussed as follows, first with respect to creating an averagedhistogram.

The histograms of the MIC area 70 and background areas 71 to 73 areaveraged. The basic concept of this averaging process is as describedabove, but in this example the average density n is obtained using theseven pixels before and after the target pixel. $\begin{matrix}{{{fma}(n)} = {\sum\limits_{k = {- 7}}^{7}{{{{fv}\left( {n + k} \right)}/15}\quad\left( {7\left\lbrack {{{n\lbrack 248)}{{fma}(n)}} = {0\quad\left( {{n < 7},{n > 248}} \right)}} \right.} \right.}}} & {{EQUATION}\quad 4} \\{{{fba}(n)} = {\sum\limits_{k = {- 7}}^{7}{{{{fb}\left( {n + k} \right)}/15}\quad\left( {7\left\lbrack {{{n\lbrack 248)}{{fba}(n)}} = {0\quad\left( {{n < 7},{n > 248}} \right)}} \right.} \right.}}} & {{EQUATION}\quad 5}\end{matrix}$

A histogram for MIC area 70 and background areas 71 to 73 is thencompiled based on the average pixel counts fma(n) and fba(n) for eachdensity level.

Calculation of the minimum limit PMin is described next.

The slope s of the histogram for MIC area 70 is obtained next using thefollowing equation where x is the data interval and y is the averagedfrequency (pixel count). $\begin{matrix}{{s({\mathbb{i}})} = {\frac{{5{\sum\limits_{k = {- 2}}^{2}{{x\left( {{\mathbb{i}} + k} \right)}{y\left( {{\mathbb{i}} + k} \right)}}}} - {\left( {\sum\limits_{k = {- 2}}^{2}{x\left( {{\mathbb{i}} + k} \right)}} \right)\left( {\sum\limits_{k = {- 2}}^{2}{y\left( {{\mathbb{i}} + k} \right)}} \right)}}{{5{\sum\limits_{k = {- 2}}^{2}\left( {x\left( {{\mathbb{i}} + k} \right)} \right)^{2}}} - \left( {\sum\limits_{k = {- 2}}^{2}{x\left( {{\mathbb{i}} + k} \right)}} \right)^{2}}{9\left\lbrack {{\mathbb{i}}\left\lbrack 246 \right.} \right.}}} & {{EQUATION}\quad 6}\end{matrix}$

Using this slope s, the density satisfying the following conditions 1 to4 is set as the minimum limit PMin.

-   -   Condition 1 s(i) x s(i+1) [0    -   Condition 2 s(i+1)<0    -   Condition 3 s(i)<0

The point satisfying conditions 1 to 3 is the point where slope schanges from negative to positive.

Condition 4 is that the cumulative relative frequency Tr1 totallingrelative frequency r(n) from n=0 is at least 8% of the total where theratio (relative frequency) r(n) of the pixel count of each density n tothe total pixel count of the MIC area 70 is obtained using the nextequation.

Condition 4 r(n)=fmv(n)/Ymv $\begin{matrix}{{{Tr}\quad 1} = {\sum\limits_{k = 0}^{\mathbb{i}}{{r(K)}\left\langle 0.08 \right.}}} & {{EQUATION}\quad 7}\end{matrix}$

The reason for providing the fourth condition that cumulative relativefrequency Tr1 is 8% is described next. A density level satisfyingconditions 1 to 3 may be found before or at the first peak 80 of thehistogram representing magnetic ink characters 48 if, for example, thereis a higher density area than magnetic ink characters 48 because ofsoiling or other reason or the density of the magnetic ink characters 48is not uniform. Therefore, even if there is a density level satisfyingconditions 1 to 3, that level will not be set to minimum limit PMin ifthe pixel count for that level does not also exceed 8% of the darkpixels represented in the histogram. What percentage the cumulativerelative frequency Tr1 is set to can be freely determined fromexperience or testing, for example.

FIG. 18 is a histogram of MIC area 70 showing minimum limit PMin andcumulative relative frequency Tr1 by way of example. Arrow sd1 in thefigure indicates the direction (order) in which points satisfyingconditions 1 to 4 are searched. Because condition 4 is met after Tr1,slope s<0 at Pmin−1, and slope s=0 at Pmin, conditions 1 to 3 are alsosatisfied and Pmin is thus set.

Calculation of the MIC maximum limit PmMax is described next.

FIG. 19 is a histogram of MIC area 70 showing a provisional MIC maximumlimit Pm1Max and cumulative relative frequency Tr2. In this examplearrow sd2 indicates the direction in which provisional MIC maximum limitPm1Max is detected, and Tr2 indicates a cumulative relative frequency of74%.

The first step is to calculate the slope s(i) of the histogram based onequation 6 above in the same way as for minimum limit PMin. As indicatedby arrow sd2 in FIG. 19, the point where the following conditions 1 to 4are satisfied is found by searching from right to left, that is,opposite the search direction for minimum limit PMin, and used as theprovisional MIC maximum limit Pm1Max.

-   -   Condition 1 s(i)×s(i−1) [0    -   Condition 2 s(i−1)[0    -   Condition 3 s(i−1)>0

The point satisfying conditions 1 to 3 is the point where slope schanges from negative to positive, and except for the search directionbeing opposite is the same as when determining minimum limit PMin.

Condition 4 is that the cumulative relative frequency Tr2 totallingrelative frequency r(n) from n=255 is at least 74% of the total wherethe ratio (relative frequency) r(n) of the pixel count of each density nto the total pixel count of the MIC area 70 is obtained using the nextequation.

Condition 4 r(n)=fmv(n)/Ymv $\begin{matrix}{{{Tr}\quad 2} = {\sum\limits_{k = 255}^{i}{{r(k)}\left\langle 0.74 \right.}}} & {{EQUATION}\quad 8}\end{matrix}$

The reason for providing the fourth condition that cumulative relativefrequency Tr2 is 74% of the total is to prevent setting provisional MICmaximum limit Pm1Max before or at the second peak 81 of the histogramrepresenting background 49 even if conditions 1 to 3 are satisfied. Whatpercentage the cumulative relative frequency Tr2 is set to can be freelydetermined from experience or testing, for example.

The provisional MIC maximum limit Pm1Max is thus set as described aboveby searching the histogram sequentially from the right side, that is,the side and direction opposite those used when setting minimum limitPMin, as indicated by arrow sd2 in FIG. 19 to find and set toprovisional MIC maximum limit Pm1Max the point at which all conditions 1to 4 are satisfied.

The density level closest to Pm1Max that satisfies the followingcondition 5 is then searched from provisional MIC maximum limit Pm1Maxand set as the true MIC maximum limit PmMax.

Condition 5 s(i)<1(Pm1Max[i [255)

FIG. 20 is a histogram showing the relationship between the provisionalMIC maximum limit Pm1Max and the true MIC maximum limit PmMax. The trueMIC maximum limit PmMax is set to the point where slope s(i) is greaterthan or equal to 1 after obtaining provisional MIC maximum limit Pm1Maxas described above because if a gradual slope s(i) continues asindicated by the dotted line 85 in FIG. 20, it is not appropriate to setthe value of the provisional MIC maximum limit Pm1Max as the true MICmaximum limit PmMax. It will be further noted that slope s(i)<1 in thisexample, that this is an experimentally determined value, and the slopecould be less than or equal to 1 or greater than or equal to 1 insofaras it appropriately represents the lower limit of the pixel setrepresenting the background 49.

Calculation of the maximum limit PMax is described next.

Background maximum limit PbMax is obtained using the same method as MICmaximum limit PmMax, and as in the first example above the smaller ofMIC maximum limit PmMax and background maximum limit PbMax is set tomaximum limit PMax.

As will be known from the above, the present invention dynamically setsa threshold value used to convert a gray scale image of the check todigital image data based on a part of the image consideredcharacteristic of check features. It is therefore possible to obtaindigital image data from which the magnetic ink character data andtextual information written or printed on the check face and needed forelectronic payment can be accurately determined.

Although the present invention has been described in connection with thepreferred embodiments thereof with reference to the accompanyingdrawings, it is to be noted that various changes and modifications willbe apparent to those skilled in the art. For example, the presentinvention shall not be limited to processing checks and can also beapplied to other types of negotiable instruments. Such changes andmodifications are to be understood as included within the scope of thepresent invention as defined by the appended claims, unless they departtherefrom.

1. A negotiable instrument processing apparatus comprising: an imagereading unit that scans a negotiable instrument and outputs an image; athreshold value determination unit that sets a threshold value used fordigitizing an image, the threshold value based on a density levelfrequency distribution of gray scale image data being obtained from afirst scanning area of the negotiable instrument when the image datareading unit scans the first scanning area, the first scanning areacontaining part of a printed text area where text is printed on thenegotiable instrument and part of a background of the negotiableinstrument; and a digital conversion processing unit that digitizes andconverts at least one image to digital image data based on the thresholdvalue set by the threshold value determination unit, the at least oneimage being obtained from a second scanning area of the negotiableinstrument when the image reading unit scans the second scanning area.2. The apparatus of claim 1, wherein the first scanning area comprises afirst area containing the part of the printed text area, a second areacontaining the part of the background, and the first and second areasare noncontiguous.
 3. The apparatus of claim 2, wherein the second areaincludes multiple sections, each section containing part of thebackground.
 4. The apparatus of claim 3, wherein the threshold valuedetermination unit determines the threshold value based on a densitylevel frequency distribution after weighting the gray scale image datain the first area.
 5. The apparatus of claim 1, wherein the printed textarea is a magnetic ink character printing area where magnetic inkcharacters are printed.
 6. The apparatus of claim 5, further comprisinga magnetic head that reads magnetic ink characters; and the thresholdvalue determination unit detects a magnetic ink character printing areabased on output signals from the magnetic head, and sets the firstscanning area based on the magnetic ink character printing area.
 7. Theapparatus of claim 1, wherein the threshold value determination unitapplies an averaging process to the density level frequency distributionand determines the threshold value based on the averaged density levelfrequency distribution.
 8. The apparatus of claim 1, wherein thethreshold value set by the threshold value determination unit is alightness value for generating the digital image data that includes thetext but substantially excludes the background.
 9. The apparatus ofclaim 1, wherein the threshold value determination unit identifies afirst peak representing the text and an adjacent second peakrepresenting the background in the density level frequency distribution,and sets the threshold value between the first and second peaks.
 10. Anegotiable instrument processing method comprising the following steps:(a) scanning a first scanning area of a negotiable instrument andgenerating gray scale image data, the first scanning area containingpart of a printed text area where text is printed on the negotiableinstrument and part of a background of the negotiable instrument; (b)generating a density level frequency distribution of the gray scaleimage data; (c) determining a threshold value for digitizing an imagebased on the density level frequency distribution; (d) scanning a secondscanning area of the negotiable instrument to obtain an image; and (e)digitizing the image obtained in step (d) based on the threshold valuedetermined in step (c) to generate digital image data.
 11. The method ofclaim 10, wherein the first scanning area comprises a first areacontaining the part of the printed text area, a second area containingthe part of the background, and the first and second areas arenoncontiguous.
 12. The method of claim 11, wherein the second areaincludes multiple sections, each section containing part of thebackground.
 13. The method of claim 12, wherein step (b) generates adensity level frequency distribution after weighting the gray scaleimage data in the first area; and step (c) determines the thresholdvalue based on the weighted density level frequency distribution. 14.The method of claim 10, wherein the printed text area is a magnetic inkcharacter printing area where magnetic ink characters are printed. 15.The method of claim 14, further comprising the following steps: (f)reading the magnetic ink characters using a magnetic head; and (g)detecting the magnetic ink character printing area based on outputsignals from the magnetic head, and setting the first scanning areabased on the magnetic ink character printing area.
 16. The method ofclaim 10, wherein step (b) generates the density level frequencydistribution after applying an averaging process; and step (c)determines the threshold value based on the averaged density levelfrequency distribution.
 17. The method of claim 10, wherein thethreshold value determined by step (c) is a lightness value forgenerating the digital image data that includes the text butsubstantially excludes the background.
 18. The method of claim 10,wherein step (c) identifies a first peak representing the text and anadjacent second peak representing the background in the density levelfrequency distribution, and sets the threshold value between the firstand second peaks.
 19. The method of claim 10, further comprising a step(h) of printing on the negotiable instrument, step (h) being executedafter step (a) and before step (d).
 20. A negotiable instrumentprocessing method comprising the following steps: (a) scanning a firstscanning area of a negotiable instrument and generating gray scale imagedata, the first scanning area containing part of a printed text areawhere text is printed on the negotiable instrument and part of abackground of the negotiable instrument; (b) generating a density levelfrequency distribution of the gray scale image data; (c) determining athreshold value for digitizing an image based on the density levelfrequency distribution; and (d) digitizing an image of a second scanningarea of the negotiable instrument based on the threshold valuedetermined in step (c) to generate digital image data.